package com.tool.emulator.apple2;

import com.tool.emulator.common.IODevice;
import com.tool.emulator.common.VirtualDevice;

/**
 * IODumper.java @author tl 2011-6-20
 */
public class UnsupportedIO extends VirtualDevice implements IODevice {
	protected final Apple2 apple2;

	public UnsupportedIO(Apple2 apple2) {
		super("UnsupportedIO");
		this.apple2 = apple2;
		this.apple2.BUS.initIO(0xC000, 0x100, this);
	}

	protected void log(int addr, String msg) {
		//System.err.println(Util.w2s(addr) + "\t" + msg + "\t" + apple2.CPU.toString() + apple2.CPU.getCycles());
	}

	public int read_io(int addr) {
		log(addr, " read io");
		return 0;//normaly >0x80 is Off
	}

	public void write_io(int addr, int val) {
		log(addr, " write io " + Util.b2s(val));
	}

}
